using UnityEngine;
using System.Collections;

public class AxisColorDropped : MonoBehaviour {

	public bool isGrounded;
	public bool isColorGrounded;
	public bool stop;
	
	void OnTriggerEnter(Collider objectCollider)
	{
		if(objectCollider.gameObject.layer == 8)
		{	
			isGrounded = true;
		}
		if(objectCollider.tag == "Color" || objectCollider.tag == "ColorSpecial")
		{
			isColorGrounded = true;
			
			if(!ColorDropped.switchDirection)
			{
				ColorDropped.switchDirection = true;
			}
		}
		
		if(objectCollider.name == "CheckpointToken")
		{
			stop = true;	
		}
	}
	
	void OnTriggerExit(Collider objectCollider)
	{
		if(objectCollider.gameObject.layer == 8)
		{
			isGrounded = false;
		}
		if(objectCollider.tag == "Color" || objectCollider.tag == "ColorSpecial")
		{
			isColorGrounded = false;
			ColorDropped.switchDirection = false;
		}
	}
	
	
}

